home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / comm / dlg / DLG_Correct_20.lha / DLG_Correct.txt < prev    next >
Text File  |  1995-07-11  |  7KB  |  168 lines

  1.                          DLG Correct / PDQ Export
  2.                              Solution Fix v2.0
  3.  
  4.                                July 11, 1995
  5.  
  6. In the recent months there has been a great amount of discussion over the
  7. problem of filenote stripping when using DLG's Msg_Correct funtion.  For a
  8. while it seemed that a small battle was developing over positions of "we
  9. need the correct feature" and "remove it to solve the problem."
  10.  
  11. My personal opinion of this feature is that it is one of the most valuable
  12. functions from within DLG's Message Menu arsenal.  In order for the
  13. Msg_Correct feature to remain viable, the problem of the message filenote
  14. being stripped has to be addressed.
  15.  
  16. This fix will solve the problem until DLG v2.0 is released with the
  17. correct-bug fixed (and from what I hear this has already been done).  The
  18. alpha of this release utilized the few working parts of DLG's Arexx
  19. capabilities, but ran into problems when I noticed that the Arexx portion
  20. of DLG dies as soon as any other background disk activity occurs.
  21.  
  22. This fix will only work for those utilizing the Msg_Correct function from
  23. a MESS-type menu (usually MSG_MAIN).
  24.  
  25.  
  26. Revisions:
  27. ~~~~~~~~~~
  28. v2.0, 07/09/95: Rewrote the entire fix into two Arexx scripts.
  29.                 Fixed a bug when correcting a message in your Pvt area.
  30.                 Added port checking in case more than one person corrects
  31.                 messages simultaneously.
  32.                 No longer force filenotes; only re-append if they
  33.                 originally existed.
  34.  
  35. v1.2, 06/21/95: Forced the creation of a filenote on a message being
  36.                 corrected that lacked one.  This stopped the script from
  37.                 dying.
  38.  
  39. v1.1, 06/18/95: First public release.
  40.  
  41.  
  42. Installation:
  43. ~~~~~~~~~~~~~
  44.     **| If you are upgrading from the previous release of this     |**
  45.     **| fix, then you may delete all DLGConfig:Batch/DLG_Correct.* |**
  46.     **| files before proceeding.                                   |**
  47.  
  48. 1. Cut/Copy the below-written files to their appropriate directories and
  49.    filenames and noted above each. 
  50.  
  51. 2. You will need to configure the menu item from which the Msg_Correct
  52.    function is called.  Again, this is usually MSG_MAIN, option C.
  53.  
  54. 3. Modify the menu item so that its configuration is:
  55.  
  56.    [ 2] Menu script:  (path/name)  DLGConfig:Batch/DLG_Correct.menuscr
  57.    [ 5] Type:                      Menu script
  58.    [10] Load Type:                 OVERLAY
  59.    [13] Cli mode:                  YES
  60.  
  61.    The rest can probably stay the same.
  62.  
  63. 4. The script used require that you have DELETE, FILENOTE, and LIST in your
  64.    C: directory (there's almost no reason for them not being there now).
  65.    It also requires that you have a T: directory.
  66.  
  67.  
  68. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  69. Menu Script "DLGConfig:Batch/DLG_Correct.menuscr"
  70. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  71. EXE     RX Rexx:DLG_PreCorrect.rexx %UNAME %PORT %Msg_AreaNumber %Msg_MsgNumber
  72. BUILTIN Msg_Correct
  73. EXE     RX Rexx:DLG_PostCorrect.rexx %PORT
  74.  
  75. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  76. Arexx Script "REXX:DLG_PreCorrect.rexx"
  77. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  78. /*************************************************************************/
  79. /*                       DLG Correct / PDQ Export                        */
  80. /*                           Solution Fix v2.0                           */
  81. /*                                                                       */
  82. /*                          Pre-Process Module                           */
  83. /*                                                                       */
  84. /*                    Created by Jon Godfrey (RE0273)                    */
  85. /*             Fido: 1:212/1005   INet: jdgodfre@slonet.org              */
  86. /*************************************************************************/
  87.  
  88. parse arg arg_list
  89. parse var arg_list uname port area msgnum
  90. uname=strip(uname,b) ;port=strip(port,b); area=strip(area,b); msgnum=strip(msgnum,b)
  91.  
  92. no_filenote_flag = 0
  93.  
  94. tempfile = 't:dlg_correct.'||port
  95. delete_tempfile = 'c:delete >NIL: '||tempfile
  96.  
  97. filenote_file = 't:filenote.'||port
  98.  
  99. if area=="PVT" then
  100.    msg_path = 'USER:'||uname||'/'||msgnum||'.msg'
  101. else
  102.    msg_path = 'MSG:'||area||'/'||msgnum||'.msg'
  103.  
  104. list_msg_info = 'c:list >'||tempfile||' '||msg_path||' nohead'
  105. address command list_msg_info
  106.  
  107. call open(fn,tempfile,R)
  108.    filename = readln(fn)
  109.    filenote = readln(fn)
  110.    if eof(fn) = 1 then no_filenote_flag = 1
  111. call close(fn)
  112.  
  113. address command delete_tempfile
  114.  
  115. if no_filenote_flag = 0 then do
  116.    filenote = right(filenote,length(filenote)-2)
  117.    call open(note,filenote_file,W)
  118.       writeln(note,msg_path)
  119.       writeln(note,filenote)
  120.    call close(note)
  121. end
  122.  
  123. exit
  124.  
  125. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  126. Arexx Script "REXX:DLG_PostCorrect.rexx"
  127. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  128. /*************************************************************************/
  129. /*                       DLG Correct / PDQ Export                        */
  130. /*                           Solution Fix v2.0                           */
  131. /*                                                                       */
  132. /*                          Post-Process Module                          */
  133. /*                                                                       */
  134. /*                    Created by Jon Godfrey (RE0273)                    */
  135. /*             Fido: 1:212/1005   INet: jdgodfre@slonet.org              */
  136. /*************************************************************************/
  137.  
  138. parse arg port
  139.  
  140. filenote_file = 't:filenote.'||port
  141. delete_filenote_file = 'c:delete >NIL: '||filenote_file
  142.  
  143. if exists(filenote_file) then do
  144.  
  145.    call open(note,filenote_file,R)
  146.       msg_path = readln(note)
  147.       filenote = readln(note)
  148.    call close(note)
  149.  
  150.    filenote_command = 'c:filenote '||msg_path||' "'filenote'"'
  151.    address command filenote_command
  152.    address command delete_filenote_file
  153.  
  154. end
  155.  
  156. exit
  157.  
  158. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  159.  
  160. I have extensively tested this modification with no loss of filenotes when
  161. they have existed prior to running this fix.
  162.  
  163. The fix is released as freeware for the benefit of the DLG users.  My only
  164. request of you is to send me any improvements you might make.
  165.  
  166. This file is also available for FREQ from 1:212/1005 under the magic
  167. filename of CORRECT and from Aminet Comm/Dlg as "DLG_Correct20.lha".
  168.